<!--
 * @Description: 你的代码我的心
 * @Author: GGB
 * @Date: 2022-02-23 17:54:28
 * @LastEditors: GGB
 * @LastEditTime: 2022-02-24 16:27:29
-->
<template>
  <PageWrapper content-full-height contentClass="flex">
    <template #headerContent>
      <a-button type="primary" size="small" @click="toggleDom">数据中台</a-button></template
    >
    <div
      ref="domRef"
      class="flex items-center flex-cloumn flex-1 justify-center bg-white rounded-md"
    >
      <Amap />
    </div>
  </PageWrapper>
</template>
<script lang="ts" setup>
  import { ref } from 'vue';
  import { useFullscreen } from '@vueuse/core';

  import { PageWrapper } from '/@/components/Page';
  import Amap from '../amap/src/amap.vue';

  const domRef = ref<Nullable<HTMLElement>>(null);
  // const { enter, toggle, exit, isFullscreen } = useFullscreen();
  const { toggle: toggleDom } = useFullscreen(domRef);
  // onMounted(()=>{
  //   setTimeout(()=>{
  //     !isFullscreen&&toggleDom()
  //   },1500)
  // })
</script>
